<script setup>
  import { ref } from 'vue'
  import { erFormConfig } from 'everright-formeditor'
  import 'Everright-formEditor/dist/style.css'
  const lang = ref('zh-cn')
  const EReditorRef = ref(null)
  const handleListener = async ({ type, data }) => {
    switch (type) {
      case 'changeParams':
        break
    }
  }
  const cfg = {
    type: 'input',
    label: '邮箱',
    icon: 'email',
    key: 'input_kHJzxFuYrGpmQHDn_-hV-',
    id: 'kHJzxFuYrGpmQHDn_-hV-',
    options: {
      clearable: true,
      renderType: 2,
      disabled: false,
      showPassword: false,
      defaultValue: '',
      placeholder: '请输入',
      labelWidth: 100,
      isShowLabel: true,
      required: false,
    },
    style: {
      width: {
        pc: '100%',
        mobile: '100%',
      },
    },
  }
</script>
<template>
  <er-form-config
    :lang="lang"
    @listener="handleListener"
    :field="cfg"
    ref="EReditorRef"
  />
</template>
